#ifdef _WIN32
#pragma once
#include "input.h"
#define _WIN32_WINDOWS 0x501
#define _WIN32_WINNT 0x0501
#include <windows.h>

namespace krryn{
namespace system_imp{
	class input_manager_win32 : public system::input_manager{
	public:
		input_manager_win32(HWND hWnd) : m_hWnd(hWnd){
			POINT l_Point;
			GetCursorPos(&l_Point);
			m_PreviousPosition.m_X = (int)l_Point.x;
			m_PreviousPosition.m_X = (int)l_Point.y;
		}

		bool wnd_proc_accept(HWND hWnd, UINT uMsg);
		LRESULT CALLBACK wnd_proc_input(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	private:
		void post_keyup_message(system::keycode_t a_Key);
		void post_keydown_message(system::keycode_t a_Key);
		void post_mouse_move(math::point a_Point);
		void post_mouse_up(system::mouse_button a_Button);
		void post_mouse_down(system::mouse_button a_Button);
		void post_mouse_scroll(system::mouse_scroll a_Scroll, int a_Amount);

		HWND m_hWnd;
		math::point m_PreviousPosition;
	};
}
}
#undef _WIN32_WINDOWS
#undef _WIN32_WINNT
#endif